import Image
def printPixel(image):
        # get a bmp file's all pixel
        img = Image.open(image)
        l=[]
        for y in range(0, 10):
                for x in range(0, 10):
                        l.append(img.getpixel((x,y)))

        return l

def getxy(number):
        #convert list's index to the tuple of pixel
        x = number % 10
        y = number / 10
        return (x, y)

def findDiff():
        # find different point between 0 and 9 
        list = []
        for i in range(0, 10):
                list.append(printPixel(str(i)+'.bmp'))

        for j in range(0,100):
                count = 0
                num = []
                for k in range(0, 10):
                        if list[k][j] != 238:
                                num.append(k)
                                count = count + 1
                if count < 3 and count > 0:
                        print 'count = ', count, ', pixel is ', getxy(j),', num is ',num


if __name__ == "__main__":
        findDiff()
